package com.xinjie.www.dao.user;

import com.xinjie.www.po.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public interface UserDao {
    //获取登录用户
    public User getLoginUser(Connection connection, String userName, String password) throws SQLException;
    //更新用户名
    public int updateUsername(Connection connection, int id, String newUsername, String oldUsername) throws SQLException;
    //修改密码
    public int updatePassword(Connection connection, int id, String password) throws SQLException;
    //修改个性签名
    public int updateSign(Connection connection, int id, String sign) throws SQLException;
    //注册用户
    public int registerUser(Connection connection, String name, String password, String sex, String birthday, String sign) throws SQLException;
    //获取用户列表
    public List<User> getAllUser(Connection connection) throws SQLException;

    //获取某贴吧下被封禁的用户
    public List<User> getBanUser(Connection connection, int tiebaId) throws SQLException;
}
